package game.model.converter;

import common.model.po.GBuildingLandform;
import common.model.po.GLandform;
import game.model.request.SaveLandformRequest;

/**
 * @author 米泽鹏
 * @since 2022-2-28 下午 4:55
 */
public class GLandformConverter {

	public static GLandform requestToPo(SaveLandformRequest saveLandformRequest) {
		if (saveLandformRequest == null) {
			return null;
		}
		GLandform gLandform = new GLandform();
		gLandform.setLandformName(saveLandformRequest.getLandformName());
		gLandform.setId(saveLandformRequest.getId());
		return gLandform;
	}

	public static GLandform buildingLandformPoToPo(GBuildingLandform gBuildingLandform) {
		if (gBuildingLandform == null) {
			return null;
		}
		GLandform gLandform = new GLandform();
		gLandform.setLandformName(gBuildingLandform.getLandformName());
		gLandform.setId(gBuildingLandform.getLandformId());
		return gLandform;
	}

}
